package com.hpsk.shopservice.model.config.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.SuperBuilder;

import java.io.Serial;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 列表控制器
 * </p>
 *
 * @author huangwang
 * @since 2025-03-20
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@Schema(description = "列表控制器")
public class MenuVo extends BizConfigMenuVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Builder.Default
    private List<MenuVo> childList = new ArrayList<>();

    private List<MenuVo> children;

    public List<MenuVo> getChildren() {
        children = new ArrayList<>();
        children.addAll(childList);
        return children;
    }
}
